home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Tools & Apps / Misc. Utilities / Installer / Installer 3.2 / Samples - Installer 3.2 / SimpleCustomOnly.r < prev    next >
Encoding:
Text File  |  1992-01-22  |  4.1 KB  |  108 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2.  *
  3.  *    Apple Macintosh Developer Technical Support
  4.  *
  5.  *  Installer 3.2 sample: very simple installation (Custom Installation only)
  6.  *
  7.  *    File:        SimpleCustomOnly.r -    Rez Source
  8.  *
  9.  *    by:            Jon Zap
  10.  *
  11.  *    Copyright © 1991 Apple Computer, Inc.
  12.  *    All rights reserved.
  13.  *
  14.  *------------------------------------------------------------------------------
  15.  *
  16.  * Install application "TheProgram" into the folder "Root":Installed Application
  17.  * It demonstrates only Custom Installation (Easy Installation is not supported)
  18.  * Note: we are not recommending that you do a custom only installation; it is
  19.  * here to show what is needed for custom installation.  (The key point is that
  20.  * frameworks and rules do not apply)
  21.  *----------------------------------------------------------------------------*/
  22.  
  23. #include "InstallerTypes.r"
  24.  
  25. /* You can build and complete the script with the following lines:
  26. # Note: set up floppies with the appropriate names and contents before running scriptcheck
  27. # or set up folders with the same names and contents as the floppies
  28. # put these folders in the same folder as the script or at the root directory of same disk
  29.  
  30.     rez -o "SimpleCustomOnly" -t 'bjbc' -c 'bjbc' "SimpleCustomOnly.r"
  31.     setfile -a i "SimpleCustomOnly"        #mark Inited
  32.     scriptcheck -p "SimpleCustomOnly"
  33. */
  34.  
  35. /* put a 1 in the creation date field of source 'infs' to have ScriptCheck set date */
  36. #define kScriptCheckSetsDate    0x01
  37.  
  38. /* Defines for the file spec atoms (specifications for source and destination files) */
  39. #define fsSourceProgram            2000
  40. #define fsTargetProgram            2001
  41.  
  42. /* This is the name of the source disk */
  43. #define ProgramDisk "Program Disk:"
  44.  
  45. /* This is the target path for where we want to install the file. */
  46. #define TargetPath    ":Installed Application:"
  47.  
  48. /* Definition for the package. */
  49. #define pkTheProgram            3000
  50.  
  51. /* Definition for the file atom */
  52. #define faProgram                4000
  53.  
  54. /***************************** Package Resources ************************************************/
  55. resource 'inpk' (pkTheProgram) {
  56.     format0 {
  57.         showsOnCustom,             /* Package appears in the Custom Install display */
  58.         removable,                /* Package can be removed */
  59.         dontForceRestart,        /* installing an app doesnt require rebooting */
  60.         0,                         /* 'icmt' not required */
  61.         0,                        /* Package size (filled in by ScriptCheck) */
  62.         "The Program", {        /* package name */
  63.             'infa', faProgram;
  64.         }
  65.     }
  66. };
  67.  
  68. /********************************************* File Specs ***************************************/
  69. /* Source File Specs */
  70. resource 'infs' (fsSourceProgram) {
  71.     'APPL',                                /* File Type */
  72.     'Arfz',                                /* Creator */
  73.     kScriptCheckSetsDate,                /* ScriptCheck will fill in the creation date */
  74.     noSearchForFile,                    /* Do not search the source disk for the file */
  75.     typeCrMustMatch,                    /* file type and creator on this file must match */
  76.     ProgramDisk"TheProgram"                /* Path to the file */
  77. };
  78.  
  79. /* Target File Specs */
  80. resource 'infs' (fsTargetProgram) {
  81.     'APPL',                                /* File Type */
  82.     'Arfz',                                /* Creator */
  83.     0,                                    /* not needed for target file spec */
  84.     noSearchForFile,                    /* Do not search the target disk for the file */
  85.     typeCrMustMatch,                    /* not needed for target file specs */
  86.     TargetPath"TheProgram"                /* installation Path */
  87. };
  88.  
  89. /******************************************** File Atoms ************************************************/
  90. resource 'infa' (faProgram) {
  91.     format0 {
  92.         deleteWhenRemoving,                /* Delete the file if remove (option-custom) is clicked    */
  93.         dontDeleteWhenInstalling,         /* don't need to predelete the target before copying new one */
  94.         copy,                             /* Copy the file to the destination */
  95.         leaveAloneIfNewer,                 /* do not Install this version, if newer one exists */
  96.         updateExisting,                 /* replace an existing copy, if mine is newer */
  97.         copyIfNewOrUpdate,                /* Copy whether the target file exists or not */
  98.         rsrcFork, dataFork,                /* Copy both forks of the file */
  99.         fsTargetProgram,                /* TARGET file spec */
  100.         fsSourceProgram,                 /* SOURCE file spec */
  101.         0,                                /* atom size (filled in by ScriptCheck) */
  102.         ""                                /* Atom Description (for a file Installer will use file name) */
  103.     };
  104. };
  105.  
  106.  
  107.  
  108.